import { http } from "@/utils/http";

/** 获取所有阶段 */
export const getAllStage = (data?: object) => {
  return http.request<any>("get", "/stage/getAllStage", { data });
};

/** 添加阶段 */
export const addStage = (data?: object) => {
  return http.request<any>("post", "/stage/addStage", { data });
};

/** 删除阶段 */
export const deleteStage = (params?: object) => {
  return http.request<any>("delete", "/stage/deleteStage", { params });
};

/** 根据方向id获取该阶段及其课程 */
export const getStageAndCourseByOrientationId = (params?: object) => {
  return http.request<any>("get", "/stage/getStageAndCourseByOrientationId", {
    params
  });
};

/** 修改阶段 */
export const updateStage = (data?: object) => {
  return http.request<any>("put", "/stage/updateStage", {
    data
  });
};
